package yss.learn2develop.demoactivity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;

/**
 * Created by Administrator on 2014/7/26.
 */
public class BActivity extends Activity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.layou_task);

        Log.i("yss log", "A Activity :" + this.getTaskId());
        Button _buttonStartB = (Button)findViewById(R.id.button_startB);
        _buttonStartB.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent _intent = new Intent(BActivity.this,BActivity.class);
                startActivity(_intent);
            }
        });

        Button _buttonStartA = (Button)findViewById(R.id.button_startA);
        _buttonStartA.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent _intent = new Intent(BActivity.this, AActivity.class);
                startActivity(_intent);
            }
        });

    }
}
